/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package interfaz;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.MenuItem;
import java.awt.Panel;
import java.awt.TextArea;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

/**
 *
 * @author Administrador
 */
public class Main {

    /**
     * @param args the command line arguments
     */
 public void ventana1(){
 Frame f=new Frame("WInFF");
 Panel p=new Panel();
 Panel p2=new Panel();
 Panel p21=new Panel();
 Panel p22=new Panel();
 Panel p23=new Panel();
 Panel p24=new Panel();
 Panel p25=new Panel();
 f.add(BorderLayout.NORTH,p);
 f.add(BorderLayout.SOUTH,p2);
 p2.add(p21);
 p2.add(p22);
 p2.add(p23);
 p2.add(p24);
 p2.add(p25);

 MenuBar mb=new MenuBar();
 Menu m=new Menu("Archivo");
 Menu m2=new Menu("Editar");
 Menu m3=new Menu("Opciones");
 Menu m4=new Menu("Ayuda");
mb.add(m);
mb.add(m2);
mb.add(m3);
mb.add(m4);
MenuItem mim=new MenuItem("Salir");
 m.add(mim);

 MenuItem mim2=new MenuItem("preferencias");
 MenuItem mi2m2=new MenuItem("preferencias");
 m2.add(mim2);
 m2.add(mi2m2);

 MenuItem mim3=new MenuItem("opciones adicionales");
  MenuItem mi2m3=new MenuItem("mostrar linea de comandos");
   MenuItem mi3m3=new MenuItem("pausa al acabar");
    MenuItem mi4m3=new MenuItem("apagar al acabar");
 m3.add(mim3);
 m3.add(mi2m3);
 m3.add(mi3m3);
 m3.add(mi4m3);
  MenuItem mim4=new MenuItem("Acerca de::");
  m4.add(mim4);
  f.setMenuBar(mb);
p2.setLayout(new BorderLayout());
  p2.add(p21);
  p2.add(p22);
  p2.add(p23);
  p2.add(p24);

Button b=new Button("AÑADIR");
Button b2=new Button("ELIMINAR");
Button b3=new Button("BORRAR");
Button b4=new Button("REPRODUCIR");
Button b5=new Button("CONVERTIR");
Button b6=new Button("OPCIONES");
Button b7=new Button(".....");
p.add(b);
p.add(b2);
p.add(b3);
p.add(b4);
p.add(b5);
p.add(b6);

TextField tf=new TextField("                                                                ");
TextField tf2=new TextField("                                      ");
TextField tf3=new TextField   ("                                      ");
Label l=new Label("Resultado");
p21.add(l);
p22.add(tf);
p23.add(tf2);
p24.add(tf3);
p24.add(b7);
TextArea ta=new TextArea();
f.add(BorderLayout.CENTER,ta);

f.addWindowListener(new WindowListener() {
            public void windowOpened(WindowEvent e) {
            }
            public void windowClosing(WindowEvent e) {
                System.exit(0);

            }
            public void windowClosed(WindowEvent e) {
            }
            public void windowIconified(WindowEvent e) {            }
            public void windowDeiconified(WindowEvent e) {
            }
            public void windowActivated(WindowEvent e) {
            }
            public void windowDeactivated(WindowEvent e) {
            }
        });
 mim.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
           System.exit(0);
            }
        });
        b5.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
Main m=new Main();
m.ventana2();
            }
        });
      mim4.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
Main m=new Main();
m.ventana3();
            }
        });
        f.setSize(700, 400);
 //f.setResizable(false);
 f.setVisible(true);

 }
public void ventana2(){
Frame f=new Frame();
Panel p=new Panel();
Panel p2=new Panel();

f.add(p);
f.add(p2);
f.setLayout(new GridLayout(2, 1));
Button b=new Button("OK");
Label l=new Label("seleccione para presionar");
p.add(l);
p2.add(b);
f.setSize(160, 120);
f.setResizable(false);
f.setVisible(true);

}
public  void  ventana3(){
Frame f=new Frame("Ayuda");
Panel p=new Panel();
Panel p2=new Panel();
Panel p3=new Panel();
Panel p4=new Panel();
Panel p5=new Panel();
Panel p6=new Panel();
Panel p7=new Panel();
Panel p8=new Panel();
Panel p9=new Panel();
Panel p10=new Panel();
f.add(p);
f.add(p2);
f.add(p3);
f.add(p4);
f.add(p5);
f.add(p6);
f.add(p7);
f.add(p8);
f.add(p9);
f.add(p10);
Label l=new Label("Windd 1.1");
Label l2=new Label("http://www.winff.org");
Label l3=new Label("corporacion 2006-2009 gpl v3");
Label l4=new Label("mathew whaterford");
Label l5=new Label("dibian/ubuntu package by paul gevers ");
Label l6=new Label("additinal programing by lan stoffberg");
Label l7=new Label("high quality prestd from");
Label l8=new Label("gmag jnavas");
Label l9=new Label("icons and logo by alex klepasch");
Button b=new Button("Aceptar");
f.setLayout(new GridLayout(10,1));
f.add(l);
f.add(l2);
f.add(l3);
f.add(l4);
f.add(l5);
f.add(l6);
f.add(l7);
f.add(l8);
f.add(l9);
f.add(b);
f.setSize(400, 600);
f.setResizable(false);
f.setVisible(true);
}
    public static void main(String[] args) {
    Main m=new Main();
    m.ventana1();
    }

}